import service  from "../../utils/request.ts";

/**
 * 登录
 * @param data 登录参数
 * @returns {*}
 */
export const doLogin=(data)=>{
  return   service({
      url: "/oauth/login",
      method: 'post',
      data: data
  })
}

/**
 * 获取头像url
 */
export const getAvatar=()=>{
  return   service({
      url: "/oauth/avatar",
      method: 'get',
      data:null
  })
}

/**
 * 退出登录
 * @returns {*}
 */
export  const  logout=() =>{
    return service({
        url: "/oauth/logout",
        method: 'get',
        data: null
    })
}